<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <script src="../js/vue.js"></script>
    </head>
    <body>
        <div id="app">
            <p> {{msg}} </p>
            <button v-on:click="showInfo">请单击</button>
        </div>
        <script>
            var vm = new Vue({
                el:'#app',
                data:{
                    msg:'请点击按钮查看内容！'  
                },
                methods:{
                        showInfo(){
                            this.msg = '这是v-on指令';
                        }
                    }
            })
        </script>
    </body>
</html>